
<%@ page contentType="text/html; charset=utf-8" 
%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" 
%><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" 
%><%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" 
%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>popup.jsp</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ include file="/jsp/common/include.base.jsp" %>
<jsp:include page="/jsp/common/include.commoncode.jsp" flush="false"><jsp:param name="gp" value="1,2"/></jsp:include>
<%@ include file="/jsp/common/include.jqgrid.jsp" %>
<%@ include file="/jsp/common/include.form.jsp" %>
<script type="text/javascript">

var callback;

$(function() {
	if (window.opener) {
		var _openPopupData = window.opener._openPopupData;
		var popupData = _openPopupData[window.name];
		
		if (popupData) {
			var searchVal = popupData.args.searchVal;
			$("body").append("<span>" + searchVal + "</span>");
			callback = popupData.callback;
		}
	}
});
	
function _callback() {
	callback("반환값");
}	
</script>
</head>
<body>
<button type="button" id="btnAdd" onclick="_callback()">callback</button>
</body>
</html>